//
//  LYFNearbyTableViewCell.m
//  段子手
//
//  Created by dllo on 16/3/18.
//  Copyright © 2016年 JokesTeam. All rights reserved.
//

#import "LYFNearbyTableViewCell.h"

@interface LYFNearbyTableViewCell ()

@property (nonatomic, retain) UIImageView *iconImg;/**< 附近cell头像 */
@property (nonatomic, retain) UILabel *nameLabel;/**< 网名 */
@property (nonatomic, retain) UILabel *distanceLabel;/**< 距离 */
//@property (nonatomic, retain) UILabel *timeLabel;/**< 时间 */
@property (nonatomic, retain) UIImageView *sexImg;/**< 性别图标 */


@end

@implementation LYFNearbyTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createCell];
    }
    return self;
}

- (void)dealloc {
    
}

/** 创建 */
- (void)createCell {
    self.iconImg = [[UIImageView alloc] init];
    [self.contentView addSubview:_iconImg];
    
    self.nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_nameLabel];
    
    self.distanceLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_distanceLabel];
    
//    self.timeLabel = [[UILabel alloc] init];
//    [self.contentView addSubview:_timeLabel];
    
    self.sexImg = [[UIImageView alloc] init];
    [self.contentView addSubview:_sexImg];
    
        
}

/** 布局 */
- (void)layoutSubviews {
    [super layoutSubviews];
    _iconImg.frame = CGRectMake(10, 10, 80, 80);
    _iconImg.backgroundColor = [UIColor yellowColor];
    _iconImg.layer.cornerRadius = 40;
    
    _nameLabel.frame = CGRectMake(100, 20, 200, 30);
    _nameLabel.backgroundColor = [UIColor greenColor];
    
    _distanceLabel.frame = CGRectMake(100, 50, 70, 30);
    _distanceLabel.backgroundColor = [UIColor orangeColor];
    
//    _timeLabel.frame = CGRectMake(180, 50, 70, 30);
//    _timeLabel.backgroundColor = [UIColor purpleColor];
    
    self.sexImg.frame = CGRectMake(320, 20, 15, 15);
    _sexImg.backgroundColor = [UIColor orangeColor];
    
   }

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
